import os.path
import time
from selenium import webdriver
from selenium.webdriver.common.by import By

# print(os.path.abspath(__file__))
# print(os.path.dirname(os.path.abspath(__file__)))
# exit(0)

driver = webdriver.Chrome()
file = os.path.join(os.path.abspath('html/upload_file.html'))
driver.get(file)
driver.maximize_window()

# path = os.path.dirname(os.path.abspath(__file__)) + '/01-弹窗处理.py'
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '01-弹窗处理.py')
time.sleep(3)
driver.find_element(By.NAME, 'file').send_keys(path)

time.sleep(3)
driver.quit()
